package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.Stu;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StuMapper extends BaseMapper<Stu> {
    @Select("select * from stu where college like concat('%',#{college},'%') and speciality like concat('%',#{speciality},'%') and classes like concat('%',#{classes},'%')")
    List<Stu> selectAll(Stu stu);
    @Select("select * from stu where id = #{id}")
    List<Stu> getById(Long id);
}
